home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 3 / Amiga Format CD03 (1996-07-04)(Future Publishing)(GB)(Track 1 of 6)[!][issue 1996-08].iso / comms / netsoftware / archie38_1.lha / archie-1.4 / Makefile < prev    next >
Makefile  |  1995-01-04  |  5KB  |  145 lines

  1. #
  2. # Makefile for the minimal build for an archie Prospero client.
  3. #
  4. # Your C compiler:
  5. #CC=cc
  6.  
  7. # For most systems, these OPTIONS will suffice.  Exceptions:
  8. #
  9. #    * If you're on a Stardent, add  -43
  10. #    * If you're running EP/IX, you may need to add  -systype bsd43
  11. #      but try it without it first.
  12. OPTIONS= -O -I. -I/usr/netinclude -I/usr/ucbinclude
  13.  
  14. # For this, DEFINES is usually ok as-is.  Try it without any of these
  15. # first; if some stuff fails or shows up undefined, then come back and
  16. # add 'em.  Also please drop me a line if you had to add anything...ideally
  17. # things will reach a point where this whole section will be unnecessary.
  18. #
  19. #     * if you want to include the debugging code (so you
  20. #       can help with problem-solving if any crop up), add    -DDEBUG
  21. #     * if you're running Interactive Unix, add              -DISC
  22. #     * if you're running System V, add                  -DSYSV
  23. #     * if you're running a USG (System V.2) system, add      -DUSG
  24. #     * if you're running UTS, add                  -DUTS
  25. #     * if your system doesn't have the functions index(),
  26. #       rindex(), bcopy(), or bzero(), add                    -DFUNCS
  27. #     * if your system is missing the getenv(3) routine, add  -DGETENV
  28. #     * if your system doesn't have the re_comp/regcmp or re_exec/regex
  29. #       routines (no regex(3)/regcmp(3X) library), then add   -DNOREGEX
  30. #     * if your system is lacking strspn(), add               -DSTRSPN
  31. DEFINES= -DDEBUG
  32.  
  33. # The default Archie server; choose one of:
  34. #    archie.ans.net        (USA [NY])
  35. #    archie.rutgers.edu        (USA [NJ])
  36. #    archie.sura.net        (USA [MD])
  37. #    archie.unl.edu        (USA [NE])
  38. #    archie.mcgill.ca        (Canada)
  39. #    archie.funet.fi        (Finland/Mainland Europe)
  40. #    archie.au            (Australia)
  41. #    archie.doc.ic.ac.uk    (Great Britain/Ireland)
  42. #    archie.wide.ad.jp        (Japan)
  43. #    archie.ncu.edu.tw        (Taiwan)
  44. #
  45. # Note this only applies to the command-line client; to change the
  46. # default for the Emacs lisp version, set the archie-server variable.
  47. ARCHIE= archie.sura.net
  48.  
  49. #    Usually LDFLAGS is empty; if, after you build this, archie
  50. #     complains that it can't resolve ARCHIE.ANS.NET (or whatever
  51. #     you defined ARCHIE_HOST as), you need to add `-lresolv'.
  52. #
  53. #    * If you need the PW library (e.g. A/UX), add -lPW
  54. LDFLAGS=
  55. # If you're using ISC, use:
  56. #LDFLAGS= -linet
  57. # If you're using Wallongong TCP/IP on an AT&T box, use:
  58. #LDFLAGS= -lnet -lnsl_s
  59. # If you're using UTS, use:
  60. #LDFLAGS= -lsocket
  61. # If you're using System V Release 4, use:
  62. #LDFLAGS= -L/usr/ucblib -lucb -lsockdns -lnsl
  63. # If you're using Solaris 2.0, use:
  64. #LDFLAGS= -lnsl -lsocket -L/usr/ucblib -lucb
  65. # If you're using Consensus SVR4, use:
  66. #LDFLAGS= -lnsl_i -lsocket -lucb
  67. # If you're using Dynix/PTX, use:
  68. #LDFLAGS= -lsocket -linet -lnsl -lPW
  69.  
  70. # Change this if necessary.
  71. RM=/bin/rm
  72.  
  73. # =========================
  74. # Yer' done....make archie.
  75. # =========================
  76. #
  77. CFLAGS=$(OPTIONS) $(DEFINES) -DARCHIE_HOST=\"$(ARCHIE)\"
  78.  
  79. VERSION=1.4
  80. VMS_VERSION=`echo $(VERSION) | sed -e 's,\\.,_,g'`
  81.  
  82. OBJS=    aquery.o archie.o atalloc.o dirsend.o get_pauth.o get_vdir.o \
  83.     getopt.o getopt1.o \
  84.     perrmesg.o procquery.o ptalloc.o regex.o stcopy.o support.o \
  85.     vlalloc.o vl_comp.o
  86.  
  87. all: archie
  88.  
  89. archie: $(OBJS)
  90.     $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
  91.  
  92. $(OBJS): archie.h pmachine.h pcompat.h Makefile
  93.  
  94. procquery.o: copyright.h
  95.  
  96. clean:
  97.     $(RM) -f *.o archie archie.doc
  98.  
  99. gclean: clean
  100.     $(RM) -f *~ archie.0* archie$(VMS_VERSION).com archie.tar* gmon.out archie.doc
  101.  
  102. unx-deadly:
  103.     unifdef -UXARCHIE xprocquery.c > procquery.c
  104.  
  105. FILES=    INSTALL Makefile Prospero README README.ALEX README.dos archie.c \
  106.     archie.h archie.el archie.lnk archie.doc archie.man aquery.c \
  107.     atalloc.c dirsend.c get_pauth.c get_vdir.c \
  108.     getopt.c getopt.h getopt1.c \
  109.     make.com makefile.cut makefile.dos makefile.os2 makefile.nfs \
  110.     msdos/cutcp.h msdos/hostform.h msdos/netevent.h pc-archie.nfs \
  111.     perrmesg.c patchlevel.h pauthent.h pcompat.h perrno.h pfs.h pmachine.h \
  112.     pprot.h procquery.c ptalloc.c rdgram.h regex.c regex.h stcopy.c \
  113.     support.c copyright.h vl_comp.c vlalloc.c vms.h vms_support.c \
  114.     vms/fd.h vms/in.h vms/pseudos.h vms/signal.h vms/socket.h vms/time.h \
  115.     vms/types.h vms/network.h vms/multi.opt vms/ucx.opt vms/woll.opt
  116.  
  117. BFILES= $(FILES) xprocquery.c
  118.  
  119. dist: tar shar dcl
  120.  
  121. shar: archie.doc
  122.     makekit -narchie-$(VERSION). archie-$(VERSION) `echo $(FILES) | \
  123.         tr ' ' '\012' | sed -e "s/^/archie-$(VERSION)\//g"` \
  124.         vms msdos > Manifest
  125.  
  126. archie.doc: archie.man
  127.     nroff -man archie.man | tr '\010' _ | sed -e s/__//g > archie.doc
  128.  
  129. dcl: archie.doc
  130.     if [ ! -d archie$(VMS_VERSION)/ ]; then ln -s . archie$(VMS_VERSION); fi
  131.     echo '$$ write sys$$output "Unpacking..."' > archie$(VMS_VERSION).com
  132.     echo '$$ if f$$search("archie.dir") .eqs. "" then create/dir [.ARCHIE]' >> archie$(VMS_VERSION).com
  133.     echo '$$ if f$$search("[.ARCHIE]vms.dir") .eqs. "" then create/dir [.ARCHIE.VMS]' >> archie$(VMS_VERSION).com
  134.     echo '$$ if f$$search("[.ARCHIE]msdos.dir") .eqs. "" then create/dir [.ARCHIE.MSDOS]' >> archie$(VMS_VERSION).com
  135.     echo '$$ set noverify' >> archie$(VMS_VERSION).com
  136.     dclshar `echo "$(FILES)" | tr ' ' '\012' | \
  137.         sed -e "s/^/archie\//g"` >> archie$(VMS_VERSION).com
  138.     echo '$$ write sys$$output "Ok, now enter the ARCHIE directory, look at MAKE.COM, then type @MAKE ."' >> archie$(VMS_VERSION).com
  139.  
  140. tar: archie.doc
  141.     if [ ! -d archie-$(VERSION)/ ]; then ln -s . archie-$(VERSION); fi
  142.     tar cvf archie-$(VERSION).tar `echo $(FILES) |\
  143.      tr ' ' '\012' | sed -e "s/^/archie-$(VERSION)\//g"`
  144.     compress -f archie-$(VERSION).tar
  145.